<?php
/*
 * Created on Feb 5, 2009
 * @author: ANH
 * @ fileName: /modules/Form/Place.php
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
 
 class archin_Form_People extends Zend_Form
 {
 	 protected $cName = 'archin_Form_People';
     protected $_noDecorator = array(
        'ViewHelper', 
        'Errors'
    );
    
    public function cluBuild($params)
    {
    
        $filterTrim = new Zend_Filter_StringTrim();

        $this->setMethod('POST');
	    
   		$name = new Zend_Form_Element_Text('name_vi', array('disableLoadDefaultDecorators' => true,
                                                                       "size" => "35", 
                                                                       'required' => true));
        $name->addDecorators($this->_noDecorator)
                      	->addFilter($filterTrim)
            			->addValidator('NotEmpty');
      	$this->addElement($name);

      	if (WYSIWYG == "fck")
      	{
	   	    $description_vi = new Clu_Form_Element_FckEditor('description_vi', array(
            		'fckOptions' => array (
            						'Height' =>  200,
            						'Width'  => 200,
            						'ToolbarSet' => "Comment"
            					),
           			 "class" => "rte"
           			 )
            );
            $this->addElement($description_vi);

            $description_en = new Clu_Form_Element_FckEditor('description_en', array(
            		'fckOptions' => array (
            						'Height' =>  200,
            						'Width'  => 200,
            						'ToolbarSet' => "Comment"
            					),
            		"class" => "rte"
           			 )
            );
            
            $this->addElement($description_en);
      	}
	    elseif (WYSIWYG == "rte")
	    {
			$description_vi = new Zend_Form_Element_Textarea('description_vi', array(
        			'height' =>  200,
            		'width'  => 200,
					'class' => "rte",
           			 )
            );
            $this->addElement($description_vi);

            
			$description_en = new Zend_Form_Element_Textarea('description_en', array(
        			'height' =>  200,
            		'width'  => 200,
					'class' => "rte"
           			 )
            );
            $this->addElement($description_en);
            	    	
	    }
	    
        // add the submit button
		if ($params['action'] === 'new')
    		$submit = new Zend_Form_Element_Submit('submit', array('disableLoadDefaultDecorators' => true, 
                                                           'label' => t(58) ));
      	elseif ($params['action'] === 'update')
      		$submit = new Zend_Form_Element_Submit('submit', array('disableLoadDefaultDecorators' => true, 
                                                               'label' => t(59) ));
        
        $submit->addDecorators($this->_noDecorator);
        $this->addElement($submit);        
    }
 }
 
?>
